//
//  BaseType+Description.swift
//  ai_assettool
//
//  Created by 李旭峰 on 2021/4/10.
//

import Foundation

protocol AICustomStringConvertible {
    var aiDescription: String { get }
}

extension Bool : AICustomStringConvertible {
    var aiDescription: String {
        switch self {
        case true:return "true"
        default:return "false"
        }
    }
}

extension Int : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension UInt : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension Int8 : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension Int16 : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension Int32 : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension Int64 : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension Double : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension Float : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

@available(iOS 14.0, *)
extension Float16 : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension NSNumber : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension String : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}

extension Date : AICustomStringConvertible {
    var aiDescription: String {
        return self.description
    }
}
